cmake_minimum_required(VERSION 3.5)

project(cJSON
    VERSION 1.7.18
    LANGUAGES C)

# 定义静态库和头文件目录
set(CJSON_LIB cjson)

file(GLOB CJSON_SRC_FILES cJSON.c)

# 增加静态库
add_library(${CJSON_LIB} STATIC ${CJSON_SRC_FILES})

# 添加头文件路径
target_include_directories(${CJSON_LIB} PUBLIC
    ${CMAKE_CURRENT_SOURCE_DIR}
)

